<?php 
if(!$_SESSION['leider'] || !$index)
{
    include('404.php');
}
else
{
?>
<link rel="stylesheet" type="text/css" href="styles/inschrijvingen.css" />
<center>
<h2>Inschrijvingen</h2>

<?php
$ps = new PreparedStatement("SELECT * FROM inschrijvingen ORDER BY achternaam ASC;");
$q = $ps->execute();
echo "<table>";
echo "<tr><td class='toprow'>Voornaam: </td><td class='toprow'>Achternaam: </td><td class='toprow'>Tussenvoegsels: </td><td class='toprow'>Adres:</td></tr>";
while($row = mysql_fetch_array($q))
{
    echo "<tr><td>{$row['voornaam']}</td><td>{$row['achternaam']}</td><td>{$row['tussenvoegsels']}</td><td>{$row['adres']}</td></tr>";
}
echo "</table></center>";


}
?>